package lab04.Test02;

/**
 * Created by lady on 2017/12/20.
 */
public class FirstThread extends Thread {
    //一个线程每隔1秒向控制台输出“Hello, World!”
    public void run() {
        while(true) {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("Hello,World!");
        }
    }
}
